package sudroid;

import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.SortedSet;

public class SetUtil
{
  public static <T> Set<T> complement(Set<T> paramSet1, Set<T> paramSet2)
  {
    Set localSet1 = union(paramSet1, paramSet2);
    Set localSet2 = intersection(paramSet1, paramSet2);
    return difference(localSet1, localSet2);
  }

  public static <T> Set<T> difference(Set<T> paramSet1, Set<T> paramSet2)
  {
    HashSet localHashSet = new HashSet(paramSet1);
    boolean bool = localHashSet.removeAll(paramSet2);
    return localHashSet;
  }

  public static <T> T getElementFromIndex(int paramInt, SortedSet<T> paramSortedSet)
  {
    if (paramSortedSet == null)
      throw new NullPointerException("set is null!");
    int i = paramSortedSet.size();
    if ((paramInt >= i) || (paramInt < 0))
      throw new IndexOutOfBoundsException("index isn't in bounds of set!");
    Iterator localIterator = paramSortedSet.iterator();
    int j = -1;
    if (!localIterator.hasNext());
    for (Object localObject = null; ; localObject = localIterator.next())
    {
      return localObject;
      j += 1;
      if (j != paramInt)
        break;
    }
  }

  public static <T> Set<T> intersection(Set<T> paramSet1, Set<T> paramSet2)
  {
    HashSet localHashSet = new HashSet(paramSet1);
    boolean bool = localHashSet.retainAll(paramSet2);
    return localHashSet;
  }

  public static <T> Set<T> union(Set<T> paramSet1, Set<T> paramSet2)
  {
    HashSet localHashSet = new HashSet(paramSet1);
    boolean bool = localHashSet.addAll(paramSet2);
    return localHashSet;
  }
}

/* Location:           D:\Program Files\eclipse\apktool-r01-3\新浪微博\classes.dex.dex2jar.jar
 * Qualified Name:     sudroid.SetUtil
 * JD-Core Version:    0.6.0
 */